package com.kuzlak.cms.libraries;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegexValidUtils {

    public static boolean isUserName(String str) {
        String pattern = "^[a-z][a-z0-9]{4,50}$";
        Pattern r = Pattern.compile(pattern);
        Matcher m = r.matcher(str);
        boolean matches = m.matches();
        return matches;
    }
}
